.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;
.super Ljava/lang/Object;
.source "DevaceCapabilitiesManager.java"


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "NewApi"
    }
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager$JsonMap;
    }
.end annotation


# static fields
.field private static final CALENDAR:Ljava/lang/String; = "calendar"

.field private static final EMAIL:Ljava/lang/String; = "email"

.field private static final INLINE_VIDEO:Ljava/lang/String; = "inlineVideo"

.field private static final SMS:Ljava/lang/String; = "sms"

.field private static final STORE_PICTURE:Ljava/lang/String; = "storePicture"

.field private static final TEL:Ljava/lang/String; = "tel"


# direct methods
.method private constructor <init>()V
    .locals 0

    .prologue
    .line 80
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 81
    return-void
.end method

.method private static checkCanHandle(Landroid/content/Context;Ljava/lang/String;)Z
    .locals 4
    .parameter "context"
    .parameter "uri"

    .prologue
    .line 166
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 167
    .local v0, intent:Landroid/content/Intent;
    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 168
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    const/high16 v3, 0x1

    invoke-virtual {v2, v0, v3}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v1

    .line 170
    .local v1, resolveActivity:Landroid/content/pm/ResolveInfo;
    if-eqz v1, :cond_0

    const/4 v2, 0x1

    :goto_0
    return v2

    :cond_0
    const/4 v2, 0x0

    goto :goto_0
.end method

.method static getCapabilities(Landroid/content/Context;)Ljava/util/Map;
    .locals 3
    .parameter "context"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 90
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager$JsonMap;

    const/4 v1, 0x7

    invoke-direct {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager$JsonMap;-><init>(I)V

    .line 91
    .local v0, capabilities:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsTelephony(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 92
    const-string v1, "tel"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 94
    :cond_0
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsSms(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 95
    const-string v1, "sms"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 97
    :cond_1
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsEmail(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 98
    const-string v1, "email"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 100
    :cond_2
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsCalendar(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 101
    const-string v1, "calendar"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 103
    :cond_3
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsStorePicture(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 104
    const-string v1, "storePicture"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 106
    :cond_4
    invoke-static {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->supportsInlineVideo(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 107
    const-string v1, "inlineVideo"

    const-string v2, "true"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 109
    :cond_5
    return-object v0
.end method

.method private static supportsCalendar(Landroid/content/Context;)Z
    .locals 5
    .parameter "context"

    .prologue
    const/4 v2, 0x1

    .line 119
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v4, 0xe

    if-ge v3, v4, :cond_0

    .line 120
    new-instance v0, Landroid/content/Intent;

    const-string v3, "android.intent.action.EDIT"

    invoke-direct {v0, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 121
    .local v0, intent:Landroid/content/Intent;
    const-string v3, "vnd.android.cursor.item/event"

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 122
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    const/high16 v4, 0x1

    invoke-virtual {v3, v0, v4}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v1

    .line 124
    .local v1, resolveActivity:Landroid/content/pm/ResolveInfo;
    if-eqz v1, :cond_1

    .line 126
    .end local v0           #intent:Landroid/content/Intent;
    .end local v1           #resolveActivity:Landroid/content/pm/ResolveInfo;
    :cond_0
    :goto_0
    return v2

    .line 124
    .restart local v0       #intent:Landroid/content/Intent;
    .restart local v1       #resolveActivity:Landroid/content/pm/ResolveInfo;
    :cond_1
    const/4 v2, 0x0

    goto :goto_0
.end method

.method private static supportsEmail(Landroid/content/Context;)Z
    .locals 1
    .parameter "context"

    .prologue
    .line 136
    const-string v0, "mailto:"

    invoke-static {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->checkCanHandle(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method private static supportsInlineVideo(Landroid/content/Context;)Z
    .locals 6
    .parameter "context"

    .prologue
    const/16 v5, 0xc

    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 180
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v4, 0xb

    if-lt v3, v4, :cond_2

    .line 181
    check-cast p0, Landroid/app/Activity;

    .end local p0
    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v0

    .line 182
    .local v0, window:Landroid/view/View;
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v3, v5, :cond_1

    invoke-virtual {v0}, Landroid/view/View;->isHardwareAccelerated()Z

    move-result v3

    if-eqz v3, :cond_1

    .line 184
    .end local v0           #window:Landroid/view/View;
    .restart local p0
    :cond_0
    :goto_0
    return v1

    .end local p0
    .restart local v0       #window:Landroid/view/View;
    :cond_1
    move v1, v2

    .line 182
    goto :goto_0

    .line 184
    .end local v0           #window:Landroid/view/View;
    .restart local p0
    :cond_2
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    if-ge v3, v5, :cond_0

    move v1, v2

    goto :goto_0
.end method

.method private static supportsSms(Landroid/content/Context;)Z
    .locals 1
    .parameter "context"

    .prologue
    .line 156
    const-string v0, "sms:"

    invoke-static {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->checkCanHandle(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method private static supportsStorePicture(Landroid/content/Context;)Z
    .locals 1
    .parameter "context"

    .prologue
    .line 194
    const/4 v0, 0x1

    return v0
.end method

.method private static supportsTelephony(Landroid/content/Context;)Z
    .locals 1
    .parameter "context"

    .prologue
    .line 146
    const-string v0, "tel:"

    invoke-static {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/DevaceCapabilitiesManager;->checkCanHandle(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method
